<ql-card>
    <div class="wrapinfo ql-padding">
        <ng-template #header>
            <ql-button *ngIf="isShowAdd&&flag!='single'" size="small" type="primary" style="margin: 1rem 0" (click)="addParam()">增加</ql-button>
        </ng-template>
        <div ql-row type="flex" style="flex-wrap: nowrap;">
            <div *ngIf="flag!='single'" ql-col span="8">
                <div class="paddcss" *ngIf="flag=='mup'">
                    <ql-input placeholder="输入关键字搜索参数" (keyup)="keyup()" [(ngModel)]="paramName"></ql-input>
                </div>
                <div class="treecss">
                    <ql-tree (modelChange)="onCatalogChange($event)" [accordion]="true" [model]="catalogList"></ql-tree>
                </div>
            </div>
            <data-table ql-col span="16" [model]="paramsList" *ngIf="flag!='single'">
                <ql-table-column model-key="name" label="参数名称"></ql-table-column>
                <ql-table-column model-key="code" label="参数编码"></ql-table-column>
                <ql-table-column model-key="data" label="参数值"></ql-table-column>
                <ql-table-column model-key="description" label="参数说明"></ql-table-column>
                <ql-table-column model-key="createTime" label="创建日期"></ql-table-column>
                <ql-table-column model-key="user" label="创建人"></ql-table-column>
                <ql-table-column label="操作">
                    <ng-template #slot let-scope="scope">
                        <ql-button type="text" (click)="updateParam(scope.rowData)">编辑</ql-button>
                        <ql-button type="text" (click)="delFun()">删除</ql-button>
                    </ng-template>
                </ql-table-column>
            </data-table>
            <data-table ql-col [model]="paramsList" *ngIf="flag=='single'">
                <ql-table-column model-key="name" label="参数名称"></ql-table-column>
                <ql-table-column model-key="code" label="参数编码"></ql-table-column>
                <ql-table-column model-key="data" label="参数值"></ql-table-column>
                <ql-table-column model-key="description" label="参数说明"></ql-table-column>
                <ql-table-column model-key="createTime" label="创建日期"></ql-table-column>
                <ql-table-column model-key="user" label="创建人"></ql-table-column>
                <ql-table-column label="操作">
                    <ng-template #slot let-scope="scope">
                        <ql-button type="text" (click)="updateParam(scope.rowData)">编辑</ql-button>
                        <ql-button type="text" (click)="delParammore()">删除</ql-button>
                    </ng-template>
                </ql-table-column>
            </data-table>
        </div>
    </div>
    <ng-template #addParamView>
        <ql-card>
            <ql-form label-width="100px" ql-row gutter="24" class="ql-margin-top">
                <ql-form-item label="参数名称" ql-col span="12">
                    <ql-input placeholder="请输入名称" [(ngModel)]="paramData.name"></ql-input>
                </ql-form-item>
                <ql-form-item label="参数编码" ql-col span="12">
                    <ql-input placeholder="请输入编码" [(ngModel)]="paramData.code"> </ql-input>
                </ql-form-item>
                <ql-form-item label="参数值" ql-col span="12">
                    <ql-input placeholder="请输入值" [(ngModel)]="paramData.data"> </ql-input>
                </ql-form-item>
                <ql-form-item label="创建时间" ql-col span="12">
                    <ql-date-picker [(ngModel)]="paramData.createTime"> </ql-date-picker>
                </ql-form-item>
                <ql-form-item label="参数说明" ql-col span="24" class="ql-margin-top">
                    <ql-input type="textarea" [rows]="2" placeholder="请输入内容" [(ngModel)]="paramData.description"> </ql-input>
                </ql-form-item>
            </ql-form>
        </ql-card>
        <div>
            <ql-button type="primary" (click)="modal.close(true)">{{isEdit?'编辑':'创建'}}</ql-button>
            <ql-button type="primary" (click)="modal.close()">取消</ql-button>
        </div>
    </ng-template>
</ql-card>
